<div class="waypoint container contact">
    <div class="row">

        <div class="col-md-12">
            <h2 class="page-title">Empresas Pendentes</h2>
        </div>
        
        <div class="col-md-12">
            <ol class="breadcrumb">
                <li><a href="<?php echo $this->url(array('controller' => 'admin', 'action' => 'index'))?>">Admin</a></li>
                <li>Empresas Pendentes</li>
            </ol>
        </div>
        
        <?php if (count($this->companies) == 0) { ?>
            <div class="col-md-1"></div>
            <div class="col-md-10">
                <div class="alert alert-info alert-dismissable" style="width: 100%; text-align: center">
                     <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                     <strong>Parabéns! </strong>
                     Nenhuma nova empresa para moderar no momento.
                </div>
            </div>
            <br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
        <?php } ?>
        
        <?php foreach ($this->companies AS $company) { ?>
            <div class="row">
                <div class="col-md-1"></div>
                <div class="col-md-10">
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            <div class="row"> 
                            <div class="col-md-10"> <?php echo $company['name']; ?> </div>
                            <div class="col-md-2"> <a href="<?php echo $this->url(array('controller' => 'admin', 'action' => 'editar-empresas', 'company' => $company['id']))?>" class="btn btn-info btn-small"> <span class="fa fa-edit"></span> Editar </a> </div>
                        </div>
                        </div>
                        <div class="panel-body">
                            <div class="col-md-2">
                                <?php 
                                    if ($company['logo'] == '') {
                                        $imgLogo = '/img/default-logo.jpg';
                                    }else {
                                        $imgLogo = $company['logo'];
                                    }
                                ?>
                                <img class="img-thumbnail" width="100" height="100" src="<?php echo $this->baseUrl().$imgLogo;  ?>">
                            </div>
                            <div class="row">
                                <div class="col-md-5">
                                    <span class="fa fa-inbox"></span><span style="font-weight: bolder; margin-left: 5px; margin-right: 5px;">Categoria: </span>
                                    <?php echo $company['category']; ?>
                                </div>
                                <div class="col-md-4">
                                    <span class="fa fa-users"></span><span style="font-weight: bolder; margin-left: 5px; margin-right: 5px;">Tamanho: </span> 
                                    <?php echo $company['size']; ?>
                                </div>
                                <div class="col-md-6">
                                    <span class="fa fa-link"></span><span style="font-weight: bolder; margin-left: 5px; margin-right: 5px;">Site: </span>
                                    <a href="http://<?php echo $company['site']; ?>" target="_new" style="font-size: 20px;"><?php echo $company['site']; ?></a>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-10">
                                    <span style="font-weight: bolder; margin-right: 10px;">Descrição: </span>
                                    <?php echo $company['description']; ?>
                                </div>
                            </div>
                        </div>
                        <div class="panel-footer" style="width: 100%; text-align: right">
                            <a href="<?php echo $this->url(array('controller' => 'admin', 'action' => 'aprovar-empresas', 'company' => $company['id'], 'aproved' => 0))?>" class="btn btn-danger"> <span class="fa fa-ban"></span> Rejeitar </a>
                            <a href="<?php echo $this->url(array('controller' => 'admin', 'action' => 'aprovar-empresas', 'company' => $company['id'], 'aproved' => true))?>" class="btn btn-success"> <span class="fa fa-check"></span> Aprovar</a>
                        </div>
                      </div>
                </div>
            </div>
        <?php } ?>
        
        
        
        
        
           
        
        
        
        
        

    </div><!-- end .row -->
</div><!-- end section -->
<script type="text/javascript">
    $( document ).ready(function() {
        $('label').tooltip();
    });
</script>